package com.example.hello.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import java.util.Date;

@Data
public class AdvertisementDTO {
    private Long adId;
    
    @NotBlank(message = "广告标题不能为空")
    private String title;
    
    private String description;
    
    @NotBlank(message = "广告图片不能为空")
    private String imageUrl;
    
    private String linkUrl;
    
    @NotNull(message = "广告位置不能为空")
    private Integer positionId;
    
    @NotNull(message = "开始时间不能为空")
    @JsonFormat(pattern = "HH:mm:ss")
    private Date startTime;
    
    @NotNull(message = "结束时间不能为空")
    @JsonFormat(pattern = "HH:mm:ss")
    private Date endTime;
    
    private Integer priority = 0;
    private Integer status = 0; // 默认为待发布
} 